#!/usr/bin/ruby

counter= 0
nLines =0
fileName = ARGV[0]
file = File.new(fileName,"r")
while(line = file.gets)
  words = line.split(" ")
  if((Integer (words[0]))!= 0)
    counter = counter+1
   puts words[0]
  end
  nLines = nLines+1
end
puts "Counter "+counter.to_s+" nLines "+nLines.to_s